    // 功能菜单
    var functionList = [
        ["创建房间", "href", "/createRoom"],
        ["加入房间", "href", "/joinRoom"],
        ["返回", "onclick", "back()"],
      ];
      var ul = document.querySelector("menu>ul");
      //   添加功能菜单
      for (let index = 0; index < functionList.length; index++) {
        let a = document.createElement("a");
        a.innerText = functionList[index][0];
        a.setAttribute(functionList[index][1], functionList[index][2]);
        a.classList.add("btn");
        let li = document.createElement("li");
          li.classList.add('none')
        li.appendChild(a);
        ul.appendChild(li);
      }
      function client(self) {
        let child = ul.children;
        
      //   for (let index = 0; index < child.length; index++) {
      //     child[index].classList.add("none");
      //   }
        let aList = document.querySelectorAll("ul>li");
        for (let index = 0; index < aList.length; index++) {
          //  length 0 隐藏原来界面的按钮 1 是原先隐藏的
          if (aList[index].classList.length == 0) {
            aList[index].classList.add("none");
          } else {
            aList[index].classList.remove("none");
          }
        }
      }
  
      function back() {
        let aList = document.querySelectorAll("ul>li");
        for (let index = 0; index < aList.length; index++) {
          if (!aList[index].classList.toggle("none")) {
            aList[index].classList.remove("none");
          } else {
            aList[index].classList.add("none");
          }
        }
      }